package com.zjm.json.entity;

import java.util.Arrays;

/**
 * @author ZJM
 * @date 2024/4/7 23:09
 */
public class ComplexObject {
    private String name;
    private int age;
    private Address address;
    private String[] phones;

    public ComplexObject() {
    }

    public ComplexObject(String name, int age, Address address, String[] phones) {
        this.name = name;
        this.age = age;
        this.address = address;
        this.phones = phones;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public String[] getPhones() {
        return phones;
    }

    public void setPhones(String[] phones) {
        this.phones = phones;
    }

    @Override
    public String toString() {
        return "ComplexObject{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", address=" + address +
                ", phones=" + Arrays.toString(phones) +
                '}';
    }
}
